import { setStore,getStore } from '@/util/store'

const merUser = {
	state: {
		//选择的商户
		selectMer:getStore({name: 'selectMer'}) || {},
	},
	mutations: {
		ser_selectMer: (state, param) => {
			if(param.rpiNo){
				state.selectMer = param;
				setStore({ name: 'selectMer', content: param })
			}else{
				state.selectMer = {};
				setStore({ name: 'selectMer', content: {} })
			}
		}
	},
	actions: {
		act_selectMer({ commit },param) {
			commit('ser_selectMer',param)
		}
	}
};

export default merUser
